Skip to content

Now handle any <<foo>> or <<foo,link text> anchor in norm rules#135

Merged
james-ball-qualcomm merged 1 commit intomainfrom
134-convert-existing-adoc-links-to-html-links
Nov 27, 2025
Merged

Now handle any <<foo>> or <<foo,link text> anchor in norm rules#135
james-ball-qualcomm merged 1 commit intomainfrom
134-convert-existing-adoc-links-to-html-links

Conversation

@james-ball-qualcomm
Copy link
Collaborator

No description provided.

Signed-off-by: James Ball <jameball@qti.qualcomm.com>
@james-ball-qualcomm james-ball-qualcomm self-assigned this Nov 27, 2025
@james-ball-qualcomm james-ball-qualcomm merged commit 7a01efe into main Nov 27, 2025
6 checks passed
@james-ball-qualcomm james-ball-qualcomm deleted the 134-convert-existing-adoc-links-to-html-links branch November 27, 2025 14:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the normative rules processing to handle any AsciiDoc anchor reference (e.g., <<foo>> or <<foo,link text>>) in normative rule tag text, not just those with the norm: prefix. This allows normative text to link to non-normative sections of the documentation.

Key changes:

  • Removed duplicate instances_str assignment that was overriding the conditional logic above it
  • Generalized regex patterns to match all anchor references instead of only norm: prefixed ones
  • Simplified tag2html_link function to accept simple string parameters rather than complex objects

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/create_normative_rules.rb Removed duplicate code, generalized anchor link handling from norm: prefix only to all anchors, and simplified the tag2html_link helper function
tests/norm-rule/test.yaml Added test cases hyperlink3 and hyperlink4 to test non-normative anchor references
tests/norm-rule/test.adoc Added test content with non-normative anchor references and the anchor target definition
tests/norm-rule/expected/test-norm-tags.json Updated expected JSON output to include the new test cases
tests/norm-rule/expected/test-norm-rules.xlsx Updated expected Excel output (binary file)
tests/norm-rule/expected/test-norm-rules.json Updated expected JSON normative rules output with new test cases
tests/norm-rule/expected/test-norm-rules.html Updated expected HTML output showing proper link generation for non-normative anchors
tests/norm-rule/expected/test-norm-rules.adoc Updated expected AsciiDoc output with new test cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert existing adoc links (those without norm:) to HTML links in norm rules HTML view

2 participants